function interfaces(){
  //获取极验证验证码gt
  $http({
    url:'/getCaptcha/',
    method:'get',
  }).success(function(data){
    if (data['status']===1) {
      var gt = data['response_str']['gt'];
    }
  }).error(function(data){

  });

  //注册
  $http({
    url:'/reg/',
    method:'post',
    data:{username:'',password:'',mail:'',geetest_challenge:'',geetest_validate:'',geetest_validate_seccode:''}
  }).success(function(data){
    if (data['status']===1) {
      alert(data['message']);
    }
  }).error(function(){

  });

  //登录
  $http({
    url:'/login/',
    method:'post',
    data:{username:'',password:'',geetest_challenge:'',geetest_validate:'',geetest_validate_seccode:''}
  }).success(function(data){
    if (data['status']===1) {
      var token = data['token'];
      var retoken = data['retoken']
      localStorage.setItem('token',token);
      localStorage.setItem('retoken',retoken);
    }else{
      alert('login fail');
    }
  }).error(function(){

  });

  //登出
  $http({
    url:'/logout/',
    method:'post',
    data:{}
  }).success(function(data){
    if (data['status']===1) {
      alert('logout success');

    }else{
      alert('logout fail');
    }
  }).error(function(){

  });

  //找回密码
  $http({
    url:'/getCaptcha/',
    method:'post',
    data:{mail:''}
  }).success(function(data){
    if (data['status']===1) {
      alert('验证码已发送到邮箱，请查看');
    }else{
      alert('logout fail');
    }
  }).error(function(){

  });


  //重设密码
  $http({
    url:'/resetPassword/',
    method:'post',
    data:{mail:'',captcha:'',password:''}
  }).success(function(data){
    if (data['status']===1) {
      alert('验证码已发送到邮箱，请查看');
    }else{
      alert('重设密码失败');
    }
  }).error(function(){

  });
}
